package com.yy.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yy.domain.ProdComm;
import com.yy.dto.PageDTO;
import com.yy.dto.ProdCommQueryDTO;
import com.yy.model.Result;
import com.yy.service.ProdCommService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "评论管理相关接口")
@RequestMapping("prod/prodComm")
public class ProdCommController {
    @Autowired
    private ProdCommService prodCommService;


    @GetMapping("page")
    @ApiOperation("分页查询所有评论")
    @PreAuthorize("hasAuthority('prod:prodComm:page')")
    public Result<Page<ProdComm>> loadProdCommPage(PageDTO pageDTO, ProdCommQueryDTO prodCommQueryDTO){
        Page<ProdComm> prodCommPage=this.prodCommService.loadProdCommPage(pageDTO,prodCommQueryDTO);
        return Result.success(prodCommPage);
    }

    /**
     * 回复审核评论
     */


}
